﻿#ifndef C3FDPOSTWIDGET_H
#define C3FDPOSTWIDGET_H

#include <QWidget>
#include <QProcess>
#include "mainWidgetsAPI.h"
#include "Common/C3fdProject.h"

namespace Ui
{
	class C3fdPostWidget;
}

namespace MainWidget
{
	class C3fdPerformCurveDialog;
	class MAINWIDGETSAPI C3fdPostWidget : public QWidget
	{
		Q_OBJECT

	public:
		explicit C3fdPostWidget(QWidget *parent = nullptr);
		~C3fdPostWidget();

		void reTranslate();

	signals:
		void plotPerformCurveSig(QList<QList<double>>, QList<QList<double>>);
		void renderPostDataSig(QStringList files, QStringList types);
		void sendMessage(QString);
		void saveImageSig(QString, QString, int);

	public slots:
		void on_dsb_Height_editingFinished();
		void on_pb_GenerateReport_clicked();

		void on_pb_PerformCurve_clicked();

		void on_pb_Post_clicked();

		void on_pb_SaveImage_clicked();

		void plotPerformCurveSlot(QStringList);
		void processFinished(int, QProcess::ExitStatus);
		void readProcessOutput();
		void readAllStandardErrorSlot();
		void initWorkingConditionsList();

	private:
		Ui::C3fdPostWidget *m_Ui = nullptr;
		Common::C3fdProject *m_Project = nullptr;
		C3fdPerformCurveDialog *m_PerformCurveDialog = nullptr;
		QProcess m_Process{};
	};

}
#endif // C3FDPOSTWIDGET_H
